import React from 'react';

export default class Index extends React.Component {
    constructor(props){
        super(props)
        this.state={
            data: []
        }
    }
	componentDidMount(){
		document.title = '系统消息'
        global.Ajax.hhtc_request("notice/system_list",{}).then(data=>{
			if(data.code===1){
				this.setState({
                    data: data.data
                })
			}
		})
	}
	render(){
		return(
			<div className='msg_detail_box' style={{minHeight: '100vh',background: '#F5F5F5'}}>
                {this.state.data.map((item,index)=>{
                    return(
                        <div className='row' key={'index'+index}>
                            <p>{item.atime}</p>
                            <div>
                                <img alt='' src={require('../../imgs/msg1.png')} className='icon' />
                                <p>
                                    {item.imgs.length>0&&item.imgs.map((v,k) => {
                                        return(
                                            <img alt='' src={v} style={{display: 'block',width: '100%',height: 'auto',}} />
                                        )
                                    })}
                                    
                                    {item.content}
                                </p>
                            </div>
                        </div>
                    )
                })}
			</div>
		)
	}
}
